import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Login from './views/login/login.vue'
import Findpsw from  './views/login/findpsw.vue';
import Regist from './views/login/regist.vue'
import About from './views/About.vue'
import Member from './views/member/__member.vue'
import My from './views/member/member.vue'
import Assets from './views/member/assets.vue'
import Wallet from './views/member/wallet.vue'
import Google from './views/member/google.vue'
import Googlebind from  './views/member/googlebind.vue'
import MobileOrEmail from './views/member/mobileOrEmail.vue'
import Control from './views/control/__control.vue'
import ApiControl from './views/ApiControl.vue'
import LogControl from './views/control/LogControl.vue'
import PloyControl from './views/control/PloyControl.vue'
import PloyHistoryControl from './views/control/PloyHistoryControl.vue'
import StatisticsControl from './views/control/StatisticsControl.vue'
import DayknotControl from './views/control/dayknotControl.vue'

import Treasure from  './views/treasure/__control.vue'
import Roles from  './views/treasure/roles.vue'
import Roleslist from './views/treasure/roleslist.vue'
import Analysis from  './views/treasure/analysis.vue'
import accountDetail from './views/treasure/accountDetail.vue';
import tradingDay from './views/treasure/tradingDay.vue';
import tradingExchange from './views/treasure/tradingExchange.vue';
import arbitrageCost from './views/treasure/arbitrageCost.vue';
import arbitrageSelect from './views/treasure/arbitrageSelect.vue';
import arbitrageFormat from './views/treasure/arbitrageFormat.vue';


Vue.use(Router)

export default new Router({
  mode: '',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      component:About
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
     // component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    },
      {
          path: '/login',
          name: 'login',
          component: Login
      },
      {
          path: '/findpsw',
          name: 'findpsw',
          component: Findpsw
      },
      {
          path: '/regist',
          name: 'regist',
          component: Regist
      },
      {
          path: '/control',
          name: 'control',
          component: Control,
          children: [
                  {
                      path: '/control/log',
                      name: 'log',
                      component: LogControl
                  },
                  {
                      path: '/control/ploy',
                      name: 'ploy',
                      component: PloyControl
                  },
                  {
                      path: '/control/ployhistory',
                      name: 'ployhistory',
                      component: PloyHistoryControl
                  },
                  {
                      path: '/control/statistics',
                      name: 'statistics',
                      component: StatisticsControl
                  },
                  {
                      path: '/control/dayknot',
                      name: 'dayknot',
                      component: DayknotControl
                   }
              ]
      },
      {
          path: '/api',
          name: 'api',
          component: ApiControl
      },
      {
          path: '/member',
          name: 'member',
          component: Member,
          children:[
              {
                  path: '/member/my',
                  name: 'my',
                  component: My
              },
              {
                  path: '/member/assets',
                  name: 'assets',
                  component: Assets
              },
              {
                  path: '/member/wallet',
                  name: 'wallet',
                  component: Wallet
              },
              {
                  path: '/member/google',
                  name: 'google',
                  component: Google
              },
              {
                  path: '/member/me',
                  name: 'me',
                  component: MobileOrEmail
              },
              {
                  path: '/googlebind',
                  name: 'googlebind',
                  component: Googlebind
              },
          ]
      },
      {
          path: '/treasure',
          name: 'treasure',
          component: Treasure,
          children:[
              {
                  path: '/treasure/treasureRoles',
                  name: 'treasureRoles',
                  component: Roles
              },
              {
                  path: '/treasure/roleslist',
                  name: 'roleslist',
                  component: Roleslist
              },
              {
                  path: '/treasure/analysis',
                  name: 'analysis',
                  component: Analysis
              },
              {
                  path: '/treasure/accountDetail',
                  name: 'accountDetail',
                  component: accountDetail
              },
              {
                  path: '/treasure/tradingDay',
                  name: 'tradingDay',
                  component: tradingDay
              },
              {
                  path: '/treasure/tradingExchange',
                  name: 'tradingExchange',
                  component: tradingExchange
              },
              {
                  path: '/treasure/arbitrageCost',
                  name: 'arbitrageCost',
                  component: arbitrageCost
              },
              {
                  path: '/treasure/arbitrageFormat',
                  name: 'arbitrageFormat',
                  component: arbitrageFormat
              },
              {
                  path: '/treasure/arbitrageSelect',
                  name: 'arbitrageSelect',
                  component: arbitrageSelect
              },

          ]
      }
  ]
})
